﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace Shine.Framework
{
    
    public interface ICommand
    {
        int Bitmap { get; }
       
        string Caption { get; }
     
        string Category { get; }
      
        bool Checked { get; }
       
        bool Enabled { get; }
      
        int HelpContextID { get; }
      
        string HelpFile { get; }
       
        string Message { get; }
      
        string Name { get; }
     
        string Tooltip { get; }

      
        void OnClick();
    
        void OnCreate(object Hook);
    }
    
    public interface ITool
    {
      
        int Cursor { get; }

        
        bool Deactivate();
      
        bool OnContextMenu(int x, int y);
      
        void OnDblClick();
      
        void OnKeyDown(int keyCode, int shift);
       
        void OnKeyUp(int keyCode, int shift);
       
        void OnMouseDown(int button, int shift, int x, int y);
     
        void OnMouseMove(int button, int shift, int x, int y);
     
        void OnMouseUp(int button, int shift, int x, int y);
      
        void Refresh(int hdc);
    }

   
    public  class BaseCommand : ICommand
    {
        
        protected int m_bitmap;
       
        protected string m_caption;
      
        protected string m_category;
       
        protected bool m_checked;
       
        protected bool m_enabled;
     
        protected string m_helpFile;
       
        protected int m_helpID;
       
        protected string m_message;
      
        protected string m_name;
     
        protected string m_toolTip;

        protected BaseCommand() { }

        protected BaseCommand(Bitmap bitmap, string caption, string category, int helpContextId, string helpFile, string message, string name, string toolTip) { }

      
        public virtual int Bitmap {
            get
            {
                return m_bitmap;
            }
        }

        public virtual string Caption
        {
            get
            {
                return m_caption;
            }
        }

        public virtual string Category
        {
            get
            {
                return m_category;
            }
        }

        public virtual bool Checked
        {
            get
            {
                return m_checked;
            }
        }

        public virtual bool Enabled
        {
            get
            {
                return m_enabled;
            }
        }

        public virtual int HelpContextID
        {
            get
            {
                return m_helpID; ;
            }
        }

        public virtual string HelpFile
        {
            get
            {
                return m_helpFile;
            }
        }

        public virtual string Message
        {
            get
            {
                return m_message;
            }
        }

        public virtual string Name
        {
            get
            {
                return m_name;
            }
        }

        public virtual string Tooltip
        {
            get
            {
                return m_toolTip;
            }
        }

        public virtual void OnClick() { }

        public virtual void OnCreate(object hook) { }

        public virtual void UpdateBitmap(Bitmap bitmap) { }
    }
}
